﻿<div class="form-horizontal" ms-controller="HYGL">
    <div style="margin: 0 80px;">
        <div>
            <!--<div class="fg-item"><span>基本信息</span></div>-->
            <ul class="clearfix" style="display: block;padding:0">
                <li class="add-item add-width">
                    <label>申请人:</label>
                    <label>{{ComFunJS.convertuser(modelData.FQUser)}}</label>
                </li>
                <li class="add-item add-width fl-left">
                    <label class="add-item-label"><i>*</i>会议主题</label>
                    <div class="add-ic">
                        <input type="text" autofocus="autofocus" class="form-control szhl_require" ms-duplex="modelData.Title" />
                    </div>
                </li>
                <li class="add-item add-width fl-right">
                    <label class="add-item-label"><i>*</i>起止时间</label>
                    <div style="display:block;">
                        <div class="add-ic fl-left" style="width: 45%;">
                            <input type="text" class="form-control szhl_form_date_time szhl_require" ms-duplex="modelData.StartTime">
                        </div>
                        <div class="add-ic" style="float: left; line-height: 30px; width: 10%; text-align: center;">：</div>
                        <div class="add-ic fl-right" style="width: 45%;">
                            <input type="text" class="form-control szhl_form_date_time szhl_require" ms-duplex="modelData.EndTime">
                        </div>
                    </div>
                </li>
                <li class="add-item add-width fl-left">
                    <label class="add-item-label"><i>*</i>会议室</label>
                    <div class="add-ic">
                        <select name="conType" id="conType" ms-duplex="modelData.RoomID" class="form-control szhl_require">
                            <option ms-repeat-item="CLData" ms-attr-value="item.ID">{{item.Name}}</option>
                        </select>
                    </div>
                </li>
                <li class="add-item add-width fl-right">
                    <label class="add-item-label"><i>*</i>会议前提醒(分钟)</label>
                    <div class="add-ic">
                        <select class="form-control" ms-duplex="modelData.TXSJ">
                            <option value="-1">不提醒</option>
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="30">30</option>
                            <option value="40">40</option>
                            <option value="50">50</option>
                            <option value="60">60</option>
                            <option value="90">90</option>
                            <option value="120">120</option>
                        </select>
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label"><i>*</i>参会人</label>
                    <div class="add-ic">
                        <input type="text" class="form-control szhl_require szhl_getPeoples" ms-duplex="modelData.CYUser" />
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label"><i>*</i>会议内容</label>
                    <div class="add-ic">
                        <textarea ms-duplex="modelData.Details" rows="4" class="form-control szhl_require"></textarea>
                    </div>
                </li>
            </ul>
        </div>
        <div>
            <div class="fg-item"><span>其他信息</span><i id="btnOtherInfo"></i></div>
            <ul class="clearfix" style="padding:0" id="OtherInfo">
                <li class="add-item add-widthall">
                    <label class="add-item-label">会议服务</label>
                    <div class="add-ic">
                        <input type="text" class="form-control" ms-duplex="modelData.HYFW" />
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label">主持人</label>
                    <div class="add-ic">
                        <input type="text" class="form-control szhl_getPeoples" ms-duplex="modelData.ZCUser" />
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label">纪要人</label>
                    <div class="add-ic">
                        <input type="text" class="form-control szhl_getPeoples" ms-duplex="modelData.JLUser" />
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label">摄像人</label>
                    <div class="add-ic">
                        <input type="text" class="form-control szhl_getPeoples" ms-duplex="modelData.SXUser" />
                    </div>
                </li>
                <li class="add-item add-widthall">
                    <label class="add-item-label">附件</label>
                    <div class="add-ic">
                        <input type="text" value="" class="span2 szhl_Upload form-control" ms-duplex="modelData.Files" />
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>
    var tempmodel = avalon.define({
        $id: "HYGL",
        ColumnData: [],
        name: "会议管理",
        CLData: [],
        TypeId: ComFunJS.getQueryString("typeId"),
        iswf: true,//是否属于流程表单
        inittemp: function (strId) {
            $.getJSON('/API/VIEWAPI.ashx?Action=HYGL_GETKYHYSLIST',{}, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    tempmodel.CLData = resultData.Result;
                    if (resultData.Result.length > 0) {
                        if (tempmodel.TypeId) {
                            tempmodel.modelData.RoomID = tempmodel.TypeId;
                        }
                        if (!tempmodel.modelData.RoomID) {
                            tempmodel.modelData.RoomID = resultData.Result[0].ID;
                        };
                    }
                }
            })
            if (strId) {
                //编辑加载数据
                $.getJSON('/API/VIEWAPI.ashx?Action=HYGL_GETHYGLMODEL', { P1: strId }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        tempmodel.modelData = resultData.Result[0];
                        setTimeout(" ComFunJS.initForm()", 500);
                    }
                })
            } else {
                pmodel.isDraft = true;
                ComFunJS.initForm();
            }
        },//初始化
        modelData: { "Title": "", "Details": "", "StartTime": "", "EndTime": "", "RoomID": "", "TXSJ": "-1", "FQUser": ComFunJS.getnowuser(), "CYUser": "", "JLUser": "", "Files": "", "ZCUser": "", "SXUser": "", "HYFW": "" },
        SaveData: function (callback) {
            $.post("/API/VIEWAPI.ashx?ACTION=HYGL_ADDHYGL", { P1: JSON.stringify(tempmodel.modelData.$model) }, function (result) {
                return callback.call(this, result);
            });
        }
    });
</script>
